package ysq.xyg.recovery.model.po;

import lombok.NoArgsConstructor;

import lombok.Data;
import ysq.xyg.base.util.BaseConstant;
import ysq.xyg.base.util.BaseUtil;
import ysq.xyg.sys.model.po.SysUser;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

/**
 * 回收金模块-袋子详情表实体类
 *
 * @author congcong tao
 * @date 2019-7-3 20:51:03
 */
@Data
@NoArgsConstructor
@Table(name = "xyg_recovery_sack_detail")
public class RecoverySackDetail implements Serializable{

	/**
     * 主键
     */ 
	@Id
	private String id;

	/**
     * 袋子主键
     */ 
	@Column(name = "record_id")
	private String recordId;

	/**
     * 回收分类主键
     */ 
	@Column(name = "cat_id")
	private String catId;

	/**
     * 回收分类名称
     */ 
	@Column(name = "cat_name")
	private String catName;

	/**
     * 价格
     */ 
	@Column(name = "cat_price")
	private String catPrice;

	/**
     * 数量
     */ 
	@Column(name = "cat_num")
	private String catNum;

	/**
     * 总价
     */ 
	@Column(name = "all_price")
	private String allPrice;

	/**
     * 收益
     */ 
	@Column(name = "income_price")
	private String incomePrice;

	/**
     * 创建者
     */ 
	@Column(name = "create_user")
	private String createUser;

	/**
     * 更新者
     */ 
	@Column(name = "update_user")
	private String updateUser;

	/**
     * 删除状态1、未删除2、已删除
     */ 
	@Column(name = "remove_tag")
	private String removeTag;

	/**
     * 创建时间
     */ 
	@Column(name = "create_time")
	private Date createTime;

	/**
     * 更新时间
     */ 
	@Column(name = "update_time")
	private Date updateTime;


	public RecoverySackDetail(SysUser sysUser) {
		this.id= BaseUtil.uId();
		this.removeTag= BaseConstant.BASE_REMOVE_TAG_NORMAL;
		this.createTime = new Date();
		this.createUser = sysUser.getId();
		this.updateTime = new Date();
		this.updateUser = sysUser.getId();
	}
}